package com.linln.modules.system.dao;

import com.github.pagehelper.Page;
import com.linln.modules.system.entity.ActivityExpand;
import com.linln.modules.system.entity.ActivityUser;
import com.linln.modules.system.entity.Banners;
import com.linln.modules.system.entity.ProdSub;
import com.linln.modules.system.entity.ProductPics;
import com.linln.modules.system.vo.UserExpandNumVo;
import com.linln.modules.system.vo.UserExpandVo;
import com.linln.modules.system.vo.admins.AdminUserBillVo;
import com.linln.modules.system.vo.admins.AdminUserPointVo;
import com.linln.modules.system.vo.admins.OrderProductVo;
import com.linln.modules.system.vo.admins.PointDetailOverBillVo;
import com.linln.modules.system.vo.admins.ProductCompanyVo;
import com.linln.modules.system.vo.admins.ProductDetailVo;
import com.linln.modules.system.vo.admins.UserOrderAddress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
@Mapper
public interface CustomMapper {

    Page<AdminUserBillVo> getUserBillVoPager(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("nickName") String nickName,@Param("states")Integer state) throws Exception;

    List<ProductCompanyVo> getAllProductCompany();

    Page<AdminUserPointVo> getUserPointVoPager(@Param("nickName")String nickName);

    List<PointDetailOverBillVo> userOrder1(@Param("userId") String userId);

    List<PointDetailOverBillVo> userAccountDetail1(@Param("userId") String userId);

    ProductDetailVo getProductDetailById(@Param("id") String id);

    List<ProdSub> getProdSubs(@Param("id") String id);

    UserOrderAddress getUserOrderAddressVoByOrderId(@Param("orderId") String orderId);

    OrderProductVo getOrderDetailById(@Param("orderId") String orderId);

    Page<Banners> getBanners(@Param("names") String names);

    Page<ActivityUser> getActivityUser();

    Page<ActivityExpand> getActivityExpand();

    List<UserExpandVo> getExpandUserVo(@Param("sources")String sources,@Param("startTime")String startTime,@Param("auth") Integer auth);

    List<UserExpandNumVo> getExpandUserNumVo(@Param("id")String id,@Param("startTime")String startTime,@Param("endTime")String endTime);

    int batchInsertProductPic(List<ProductPics> list);
    int insertProdSub(List<ProdSub> list);
    int batchUpdateProductPics(@Param("prodId")String prodId);
    int updateOldSub(@Param("prodId")String prodId);

    ProdSub getProdSub(@Param("subId")String subId);

    Integer getSubPoints(@Param("orderId")String orderId);

    Integer getUserHadPoints(@Param("accountId") String accountId);
}
